.class public Lcom/brixd/niceapp/sys/service/StatisticsFollowUpService;
.super Landroid/app/IntentService;
.source "StatisticsFollowUpService.java"


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 17
    const-string v0, "StatisticsFollowUpService"

    invoke-direct {p0, v0}, Landroid/app/IntentService;-><init>(Ljava/lang/String;)V

    .line 18
    return-void
.end method

.method public static start(Landroid/content/Context;)V
    .registers 3
    .param p0, "context"    # Landroid/content/Context;

    .prologue
    .line 21
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/brixd/niceapp/sys/service/StatisticsFollowUpService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 22
    .local v0, "intent":Landroid/content/Intent;
    invoke-virtual {p0, v0}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    .line 23
    return-void
.end method


# virtual methods
.method protected onHandleIntent(Landroid/content/Intent;)V
    .registers 6
    .param p1, "intent"    # Landroid/content/Intent;

    .prologue
    .line 27
    invoke-static {}, Lcom/brixd/niceapp/service/StatisticsService;->getAllFailedLogs()Ljava/util/List;

    move-result-object v1

    .line 28
    .local v1, "logs":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/db/StatisticsEntity;>;"
    if-eqz v1, :cond_27

    invoke-interface {v1}, Ljava/util/List;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_27

    .line 29
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_d
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    if-ge v0, v3, :cond_27

    .line 30
    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/brixd/niceapp/db/StatisticsEntity;

    .line 31
    .local v2, "se":Lcom/brixd/niceapp/db/StatisticsEntity;
    invoke-static {}, Lcom/brixd/niceapp/service/UserService;->getLoginUser()Lcom/brixd/niceapp/model/UserModel;

    move-result-object v3

    invoke-static {v3}, Lcom/brixd/niceapp/util/SecrUtils;->makeToken(Lcom/brixd/niceapp/model/UserModel;)Lcom/brixd/niceapp/model/Token;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/brixd/niceapp/service/StatisticsService;->logFailedInfo(Lcom/brixd/niceapp/db/StatisticsEntity;Lcom/brixd/niceapp/model/Token;)V

    .line 29
    add-int/lit8 v0, v0, 0x1

    goto :goto_d

    .line 34
    .end local v0    # "i":I
    .end local v2    # "se":Lcom/brixd/niceapp/db/StatisticsEntity;
    :cond_27
    return-void
.end method
